version: "2"
services:
  grafana:
    image: grafana/grafana:10.3.3
    container_name: elkstack_grafana
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - "grafana_data:/var/lib/grafana"
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
      - GF_USERS_ALLOW_SIGN_UP=${GF_USERS_ALLOW_SIGN_UP}
      - GF_USERS_ALLOW_ORG_CREATE=${GF_USERS_ALLOW_ORG_CREATE}
      - GF_USERS_ALLOW_ORG_EDIT=${GF_USERS_ALLOW_ORG_EDIT}
      - GF_USERS_ALLOW_ORG_VIEW=${GF_USERS_ALLOW_ORG_VIEW}
      - GF_USERS_ALLOW_SIGN_IN=${GF_USERS_ALLOW_SIGN_IN}
      - GF_LOG_LEVEL=${GF_LOG_LEVEL}
      - GF_INSTALL_PLUGINS=${GF_INSTALL_PLUGINS}
    networks:
      - elastic

volumes:
  grafana_data:
    driver: local

networks:
  elastic:
    driver: bridge